<template>
  <el-button type="warning" @click="handleClick">
    全局组件按钮 (点击次数: {{ count }})
  </el-button>
</template>

<script>
export default {
  name: 'GlobalButton',
  data() {
    return {
      count: 0
    }
  },
  methods: {
    handleClick() {
      this.count++
      this.$emit('click', this.count)
    }
  }
}
</script>

<style scoped>
.el-button {
  margin: 10px;
}
</style>